if (($rrpt($sub(%a,%muptime)) >= 3600) || ($sub($ctime,%muptime.date) >= 86400)) {
iecho Congratulations! You have beaten your old uptime record of $hc($msdur($rrpt(%muptime))) ( $+ by $sc($msdur($rrpt($sub(%a,%muptime)))) $+ ).
iecho Your new uptime record is $hc($msdur($rrpt($ticks))) $+ , set on $asc-time($ctime) $+ .
}
set %muptime %a
set %muptime.date $ctime
set %z $true
.save -rv $readini -n $mircini rfiles n1
}
if ($1 == -s) msg $active My computer's maximum uptime: $b($msdur($rrpt(%muptime))) $+ , set on $asc-time(%muptime.date)
if ($1 == -e) {
if (%z) iecho Your computer's maximum and current uptime: $hc($msdur($rrpt(%muptime))) $+ .
else {
iecho Your computer's maximum uptime: $hc($msdur($rrpt(%muptime))) $+ , set on $asc-time(%muptime.date) ( $+ $sc($msdur($sub($ctime,%muptime.date))) ago).
iecho Your current uptime is $hc($msdur($rrpt(%a))) $+ ; you have $sc($msdur($rrpt($sub(%muptime,$ticks)))) until you reach your old record.
}
}
}
alias montime {
var %a = $online, %z
if (%montime == $null) set %montime 0
if ((%a > %montime) && ($server)) {
set %montime.server $server $+ : $+ $port
if (($sub(%a,%montime) >= 3600) || ($sub($ctime,%montime.date) >= 86400)) {
iecho Congratulations! You have beaten your old ontime record of $hc($msdur($calc(%montime))) ( $+ by $sc($msdur($sub(%a,%montime))) $+ ).
iecho Your new online time record is $hc($msdur($online)) $+ , set on $asc-time($ctime) on $server $+ : $+ $port $+ .
}
set %montime %a
set %montime.date $ctime
set %z $true
.save -rv $readini -n $mircini rfiles n1
}
if ($1 == -s) msg $active My computer's maximum ontime: $b($msdur(%montime)) $+ , set on $asc-time(%montime.date) on %montime.server
if ($1 == -e) {
if (%z) iecho Your computer's maximum and current online time: $hc($msdur($online)) $+ , set on %montime.server $+ .
else {
iecho Your maximum online time: $hc($msdur(%montime)) $+ , set on $asc-time(%montime.date) ( $+ $sc($msdur($sub($ctime,%montime.date))) ago) on %montime.server
iecho Current ontime is $hc($msdur(%a)) $+ ; you have $sc($msdur($sub(%montime,$online))) until you reach your old record.